﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Brain;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Brain.Skinning;

namespace Demos
{
    public class SkinningScreen : DemoScreen
    {
        public SkinningScreen()
        {
            Viewport viewport = Engine.Instance.GraphicsDevice.Viewport;

            InputFreeCamera3D Camera = new InputFreeCamera3D(this);
            Camera.AspectRatio = viewport.AspectRatio;
            Camera.FarPlane = 1000f;
            Camera.RotationRadians = new Vector3(-0.01745275f, -0.2094385f, 0);
            Camera.Position = new Vector3(8.938297f, 19.3541f, 36.17145f);
            Camera.InitialPosition = Camera.Position;
            Camera.InitialRotationRadians = Camera.RotationRadians;
            Engine.Instance.CameraManager.Camera3D = Camera;

            WorldObject playerMarine = new WorldObject("skin:Game\\Models\\PlayerMarine", this);
            playerMarine.StartDefaultPlayer((playerMarine.Model as SkinnedModel).AnimationClips.First().Value);
            playerMarine.Rendering = WorldObjectRendering.Rendered;

            WorldObject tiny = new WorldObject("skin:Game\\Models\\tiny", this);
            tiny.StartDefaultPlayer((tiny.Model as SkinnedModel).AnimationClips.First().Value);
            tiny.Position = new Vector3(20, 12, 0);
            tiny.Rendering = WorldObjectRendering.Rendered;
        }

        public override void Draw()
        {
            base.Draw();
        }
    }
}
